package com.zyh.exam.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zyh.common.annotation.Excel;
import com.zyh.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 试卷管理对象 t_exam_paper
 *
 * @author zyh
 * @date 2025-02-20
 */
@TableName(value = "t_exam_paper")
public class ExamPaper extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 试卷表id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 试卷标题
     */
    @Excel(name = "试卷标题")
    private String title;

    /**
     * 试卷封面
     */
    @Excel(name = "试卷封面")
    private String paperImage;

    /**
     * 试卷描述
     */
    @Excel(name = "试卷描述")
    private String description;

    /**
     * 测评卷类型
     */
    private String type;

    /**
     * 测试开始时间
     */
    @Excel(name = "测试开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    /**
     * 测试结束时间
     */
    @Excel(name = "测试结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    /**
     * 答题限制时间
     */
    @Excel(name = "答题限制时间")
    private Long timeLimit;

    /**
     * 题目总数
     */
    @Excel(name = "题目总数")
    private Long questionTotal;

    /**
     * 测评状态(0 未开始 ， 1 进行中 ，2 已结束）
     */
    @Excel(name = "测评状态")
    private String status;

    /**
     * 是否发布
     */
    @Excel(name = "是否发布")
    private String isPublished;

    /**
     * 发布者
     */
    @Excel(name = "发布者")
    private String publishedBy;

    /**
     * 发布时间
     */
    @Excel(name = "发布时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date publishedTime;


    /**
     * 无效标记
     */
    private String delFlag;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getPaperImage() {
        return paperImage;
    }

    public void setPaperImage(String paperImage) {
        this.paperImage = paperImage;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Long getTimeLimit() {
        return timeLimit;
    }

    public void setTimeLimit(Long timeLimit) {
        this.timeLimit = timeLimit;
    }

    public Long getQuestionTotal() {
        return questionTotal;
    }

    public void setQuestionTotal(Long questionTotal) {
        this.questionTotal = questionTotal;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getIsPublished() {
        return isPublished;
    }

    public void setIsPublished(String isPublished) {
        this.isPublished = isPublished;
    }

    public String getPublishedBy() {
        return publishedBy;
    }

    public void setPublishedBy(String publishedBy) {
        this.publishedBy = publishedBy;
    }

    public Date getPublishedTime() {
        return publishedTime;
    }

    public void setPublishedTime(Date publishedTime) {
        this.publishedTime = publishedTime;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    @Override
    public String toString() {
        return "ExamPaper{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", paperImage='" + paperImage + '\'' +
                ", description='" + description + '\'' +
                ", type='" + type + '\'' +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                ", timeLimit=" + timeLimit +
                ", questionTotal=" + questionTotal +
                ", status='" + status + '\'' +
                ", isPublished='" + isPublished + '\'' +
                ", publishedBy='" + publishedBy + '\'' +
                ", publishedTime=" + publishedTime +
                ", delFlag='" + delFlag + '\'' +
                '}';
    }
}
